package com.education.service.edu.feign.fallback;

import com.education.result.R;
import com.education.service.edu.feign.OssFileService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * Sentinel 容错类
 * Created by Lance on 2020/06/25 21:57
 */
@Service
@Slf4j
public class OssFileServiceFallBack implements OssFileService {

    /**
     * 熔断方法
     * @return
     */
    @Override
    public R test() {
        return R.error();
    }

    /**
     * 文件删除的熔断方法
     * @param url
     * @return
     */
    @Override
    public R removeFile(String url) {
        log.warn("开始熔断保护 : " + url);
        return R.error();
    }
}
